﻿<%@ Page Title="" Language="C#" MasterPageFile="~/App_SiteMasterPage/Site.Master"
    AutoEventWireup="true" CodeBehind="UserManagement.aspx.cs" Inherits="eProject.Web.UI.UserManagementPage" %>

<%@ Register Src="~/Controls/UserMenu.ascx" TagName="UserMenu" TagPrefix="uc" %>

<asp:Content ID="head" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="script" ContentPlaceHolderID="script" runat="server">
</asp:Content>
<asp:Content ID="leftcontent" ContentPlaceHolderID="LeftContent" runat="server">
    <uc:UserMenu ID="UserMenu" runat="server" />
</asp:Content>
<asp:Content ID="rightcontent" ContentPlaceHolderID="RightContent" runat="server">
    <div class="widget">
        <div class="widget-inner">
            <div class="widget-title">
                <h5>
                    Users
                </h5>
            </div>
            <div class="widget-content">
                <div style="text-align: center; font-weight: Bold; line-height: 20px">
                    <asp:Label ID="lblSearch" AssociatedControlID="txtSearch" runat="server" Text="Search" />
                    <asp:TextBox ID="txtSearch" Width="400px" runat="server" />
                    <asp:CheckBox ID="chkShowDeleted" Text="Show Deleted" runat="server" />
                    <asp:Button ID="btnSearch" runat="server" Text="Search" />
                </div>
                <asp:GridView ID="grvUsers" CssClass="tbStyles" runat="server" AllowPaging="True"
                    DataKeyNames="Id" AutoGenerateColumns="False" EmptyDataText="You dont have any user!">
                    <Columns>
                        <asp:TemplateField HeaderText="Edit">
                            <ItemTemplate>
                                <asp:ImageButton ID="btnEdit" runat="server" CausesValidation="False" CommandName="Edit"
                                    ImageUrl="~/Images/Icons/edit.png" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="UserName" HeaderText="User Name" />
                        <asp:BoundField DataField="Email" HeaderText="Email" />
                        <asp:BoundField DataField="Roles" HeaderText="Roles" />
                        <asp:TemplateField HeaderText="Full Name">
                            <ItemTemplate>
                                <asp:Literal ID="lblFullName" runat="server" Text='<%# Eval("FirstName") + ", " + Eval("LastName") %>' />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="DOB">
                            <ItemTemplate>
                                <asp:Literal ID="lblDOB" runat="server" Text='<%# Eval("DateOfBirth", "{0:dd/MM/yyyy}") %>' />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Gender">
                            <ItemTemplate>
                                <asp:Literal ID="lblGender" runat="server" Text='<%# Gender(Eval("Gender")) %>' />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="Address" HeaderText="Address" />
                        <asp:TemplateField HeaderText="Delete/ReActive">
                            <ItemTemplate>
                                <asp:ImageButton ID="btnDelete" runat="server" CausesValidation="False" CommandName="Delete"
                                    ImageUrl="~/Images/Icons/delete.png" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <%--<asp:TemplateField HeaderText="Active">
                            <ItemTemplate>
                                <asp:ImageButton ID="btnUpdate" runat="server" CausesValidation="False" CommandName="Update"
                                    ImageUrl="~/Images/Icons/back.png" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>--%>
                    </Columns>
                </asp:GridView>
            </div>
        </div>
    </div>
</asp:Content>
